<head>
	<link rel="stylesheet" href="assets/css/article-view.css">
</head>
<?php
$bcount = (int)$conf->a['blogs-count-digradio'];
$rcount = (int)$conf->a['reviews-count-digradio'];
$ncount = (int)$conf->a['news-count-digradio'];
?>
<div class='c-box-600 c-box c-box-left' id='article-view'>
 <h3>Features</h3>
 <h4>Latest Features</h4>
 <?php
		$ctr = 1;
		foreach($posts as $x)
		{
			if($x['post_type']=='article'){
					if($ctr<=2)
					{
							
							
						?>
		
							<li>
							   <span class="av-imageholder-latest">
							   		<a href='article/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>' title="<?PHP  echo strip_tags($x['secondary']);?>">
							   			<img src="a/show-resized.php?file=<?PHP echo $x['image'];?>&x=350&y=190" height="190" width="350" alt="<?PHP  echo $x['title'];?>">
							   		</a>	
							   </span>
								<span class="av-text-latest">
									<span class="av-text-latest-title">
										<a href='article/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>' title="<?PHP  echo strip_tags($x['secondary']);?>"><?PHP  echo $x['title']." ";?></a>
								    </span>
								    <span class="av-text-latest-content">
								    <?PHP
								     	$paragraph = explode (' ', $x['content']);
  										$paragraph = array_slice ($paragraph, 0, 50);
  										$paragraph = implode (' ', $paragraph);
								    	echo strip_tags($paragraph)."...";?>
									<a href='article/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>' title="<?PHP  echo strip_tags($x['secondary']);?>">Read More</a>
								    </span>
								</span>
								
							</li>
							<?php if($ctr<2){ ?>
									<hr />
							    <?php }?>
							
						<?php
						}
						else 
						{
						
						if($ctr==3){
						 	echo "<hr class='divider'>";
						 	echo "<h4>More Features</h4>";
						 }
						 ?>
						 
						 	<li class="av-more-feat">
								<span class="av-text">
										<a href='article/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>' title="<?PHP  echo strip_tags($x['secondary']);?>"><?PHP  echo $x['title']." ";?></a>						
										<?PHP
								     	$paragraph = explode (' ', $x['content']);
  										$paragraph = array_slice ($paragraph, 0, 10);
  										$paragraph = implode (' ', $paragraph);
								    	echo "<br />".strip_tags($paragraph);?>
								</span>
								<span class="av-imageholder">
								<a href='article/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>' title="<?PHP  echo strip_tags($x['secondary']);?>">
									<img src="a/show-resized.php?file=<?PHP echo $x['image'];?>&x=80&y=80" height="80" width="80" alt="<?PHP  echo $x['title'];?>">
								</a>	
								</span>
							</li>
							
						<?php	
						}
						$ctr++;
		          }
       
		}
	   
		?>
</div>
<div class='c-box-headline c-box-300 ad-med-300-250 c-box-right'>
        <?PHP

        global $conf;
        $ad_m = new ads();
        $ad_m->zone=5;
        $ad_m->category=$conf->qm[1];
        $ad_m->serve_image_ad();
        ?>

</div>
<div class='c-box-300 c-box blog' id='article-home'>
      	<h3>News</h3>
      	<?php
         
            	$items=0;
               foreach($posts as $x)
               {
               if($x['post_type']=='news' && $x['w']<=$ncount){	
					?>
					
						<li  class='article-image' id="article-image-<?php echo $x['id'];?>">	
            			<a class='article-image-holder' href='news/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>'>
            			<img height="60" width ="60" src="<?php echo ap($x['thumb']);?>" ></a>
							<span class='ptitle'><a href='news/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>'>
							<?PHP echo $x['title'] ?></a></span>
							<?PHP echo $x['secondary']; ?>
						</li>					
					<?php               
						}
               }
         ?>
	<li class="more-right">
          	<a class='mgalleries' href="newsview/<?php echo $parent['id']; ?>">More News</a>
          </li>
      </div>
<div class='c-box-300 c-box blog' id='article-home'>
      	<h3>Blogs</h3>
      	<?php
         
            	$items=0;
               foreach($posts as $x)
               {
               if($x['post_type']=='blog' && $x['w']<=$bcount){	
					?>
					
						<li  class='article-image' id="article-image-<?php echo $x['id'];?>">	
            			<a class='article-image-holder' href='blog/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>'>
            			<img height="60" width ="60" src="<?php echo ap($x['thumb']);?>" ></a>
							<span class='ptitle'><a href='blog/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>'>
							<?PHP echo $x['title'] ?></a></span>
							<?PHP echo $x['secondary']; ?>
						</li>					
					<?php               
						}
               }
         ?>
         <li class="more-right">
          	<a class='mgalleries' href="blogview/<?php echo $parent['id']; ?>">More Blogs</a>
          </li>
      </div>
       <div class='c-box-300 c-box review' id='article-home'>
      	<h3>Reviews</h3>
      	<?php
         
            	$items=0;
               foreach($posts as $x)
               {
               if($x['post_type']=='review' && $x['w']<=$rcount){	
					?>
					
						<li  class='article-image' id="article-image-<?php echo $x['id'];?>">	
            			<a class='article-image-holder' href='review/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>'>
            			<img height="60" width ="60" src="<?php echo ap($x['thumb']);?>" ></a>
							<span class='ptitle'><a href='review/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>'>
							<?PHP echo $x['title'] ?></a></span>
							<?PHP echo $x['secondary']; ?>
						</li>					
					<?php               
						}
               }
         ?>
	<li class="more-right">
          	<a class='mgalleries' href="reviewview/<?php echo $parent['id']; ?>">More Reviews</a>
          </li>
      </div>
